

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Incorporate Model Templates [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Template,Template Model, Incorporate In Technology,Model,Model Templates, Incorporate In Technology,MDG Technologies,MDG Technologies Incorporate Model Template">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Incorporate Model Templates</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="model_validation_2.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="deploying_mdg_technologies.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">Enterprise Architect has a number of <a href="model_patterns.htm">Model Templates</a> that can be added into a model, either on creation of the model, or at any time by right-clicking a package in the </span><span class="f_UIControl">Project Browser</span><span class="f_BodyText"> and selecting the </span><span class="f_MenuKeyField">Add</span><span class="f_MenuKeyField"> | </span><span class="f_MenuKeyField">Add a New <a href="model_wizard.htm">Model using Wizard</a>...</span><span class="f_BodyText"> context menu option. You can create your own templates and include them in your MDG Technology. The first step is to create a template package and save it to the MTS file.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Open your MTS file in a text editor and copy and paste the following </span><span class="f_Code">&lt;</span><span class="f_Code">ModelTemplates</span><span class="f_Code">&gt;</span><span class="f_BodyText"> block at the top level inside the </span><span class="f_Code">&lt;</span><span class="f_Code">MDG.Selections</span><span class="f_Code">&gt;</span><span class="f_BodyText"> block:</span></p>
<p class="p_Code"><span class="f_Code">&lt;ModelTemplates&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp; &lt;Model name=&quot;Template Name&quot;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;This is the description.&quot;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location=&quot;MyTemplatePackage.xml&quot;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default=&quot;yes&quot;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon = &quot;34&quot;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter= &quot;Filter Name&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;/ModelTemplates&gt;</span></p>
<p class="p_BodyText"><span class="f_BodyText">You can include as many </span><span class="f_Code">&lt;</span><span class="f_Code">ModelTemplates</span><span class="f_BodyText">&gt; blocks as you have model templates. The attributes have the following meanings:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1" style="font-weight: bold;">Model name</span><span class="f_Bulletlist1">: The name of the model template as shown in the </span><span class="f_UIControl">Select model(s)</span><span class="f_Bulletlist1"> dialog, which displays when you create a new model or when you execute the </span><span class="f_MenuKeyField">Add a New Model using Wizard</span><span class="f_Bulletlist1"> menu option.</span></li>
<li><span class="f_Bulletlist1" style="font-weight: bold;">description</span><span class="f_Bulletlist1">: The text that is displayed in the </span><span class="f_UIControl">Select model(s)</span><span class="f_Bulletlist1"> dialog when the name is selected.</span></li>
<li><span class="f_Bulletlist1" style="font-weight: bold;">location</span><span class="f_Bulletlist1">: Contains the path of the XML file that contains the XMI export of the model template package, relative to the location of the MDG Technology file. If the XMI file is in the same folder as the technology file then this just contains the file name.</span></li>
<li><span class="f_Bulletlist1" style="font-weight: bold;">default</span><span class="f_Bulletlist1">: Contains either </span><span class="f_Bulletlist1" style="font-weight: bold;">yes</span><span class="f_Bulletlist1"> indicating that the model template is checked by default, or </span><span class="f_Bulletlist1" style="font-weight: bold;">no</span><span class="f_Bulletlist1"> indicating that the model template is un-checked by default.</span></li>
<li><span class="f_Bulletlist1" style="font-weight: bold;">icon</span><span class="f_Bulletlist1">: Contains an index to Enterprise Architect's base icons list. To show the appropriate view icon, use one of the following values: </span><span class="f_Bulletlist1" style="font-weight: bold;">29</span><span class="f_Bulletlist1"> = Use Case, </span><span class="f_Bulletlist1" style="font-weight: bold;">30</span><span class="f_Bulletlist1"> = Dynamic; </span><span class="f_Bulletlist1" style="font-weight: bold;">31</span><span class="f_Bulletlist1"> = Class; </span><span class="f_Bulletlist1" style="font-weight: bold;">32</span><span class="f_Bulletlist1"> = Component; </span><span class="f_Bulletlist1" style="font-weight: bold;">33</span><span class="f_Bulletlist1"> = Deployment; </span><span class="f_Bulletlist1" style="font-weight: bold;">34</span><span class="f_Bulletlist1"> = Simple.</span></li>
<li><span class="f_Bulletlist1" style="font-weight: bold;">filter</span><span class="f_Bulletlist1">: If you have a large number of model templates, you can group them on the </span><span class="f_UIControl">Select model(s)</span><span class="f_Bulletlist1"> dialog by giving all the model templates in the same group the same filter name. The filter name given appears in the </span><span class="f_MenuKeyField">Select from:</span><span class="f_Bulletlist1"> list box in the </span><span class="f_UIControl">Select model(s)</span><span class="f_Bulletlist1"> dialog.</span></li>
</ul>




            </div>
          </div>
        </div>



</div>


</body>
</html>
